package com.sg.service.biz.component.impl;

import cn.hutool.core.collection.CollectionUtil;
import com.sg.common.util.CommonFunctionHelper;
import com.sg.common.util.RedisUtil;
import com.sg.dto.biz.component.req.*;
import com.sg.dto.biz.component.res.*;
import com.sg.service.biz.component.BusinessAtomService;
import com.sg.service.biz.component.InterfaceModeService;
import com.sg.service.biz.component.NetDiskService;
import com.sg.service.biz.component.nb.NbOss;
import com.sg.common.exception.Assert;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.stream.Collectors;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Service
public class OssServiceImpl
        implements com.wicket.okrcomponent.biz.service.OssService {

    @Resource
    private RedisUtil redisUtil;
    //@Resource
    //private MCustomFields6Service mCustomFields6Service;
    @Resource
    private NbOss nbOss;
    @Resource
    private BusinessAtomService businessAtomService;
    @Resource
    private NetDiskService netDiskService;
    //@Resource
    //private MOmsResourceFileService mOmsResourceFileService;
//@Resource
    //private undefinedService undefinedService;
    @Resource
    private InterfaceModeService interfaceModeService;
//@Resource
    //private NetDiskService netDiskService;

    /**
     * D2查询阿里云对象存储临时令牌详情(公共)[10380]
     * gen by moon at 12/3/2024, 10:54:29 AM
     */
    @Trace(operationName = "D2查询阿里云对象存储临时令牌详情(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryObjectStorageTemporaryCredentialsDetailComRespDto queryObjectStorageTemporaryCredentialsDetailCom(QueryObjectStorageTemporaryCredentialsDetailComReqDto reqDto) {


        QueryObjectStorageTemporaryCredentialsDetailRespDto getObjectStorageEvidenceRes_1 = null;
//步骤0: M2查询阿里云对象存储临时令牌详情（特殊方法） - queryObjectStorageTemporaryCredentialsDetail
        //ModelCode: getObjectStorageEvidence
        QueryObjectStorageTemporaryCredentialsDetailRespDto getObjectStorageEvidenceRes = null;
        QueryObjectStorageTemporaryCredentialsDetailReqDto getObjectStorageEvidenceReq = new QueryObjectStorageTemporaryCredentialsDetailReqDto();
        if (reqDto != null) {
            getObjectStorageEvidenceReq.setOriginalRoleMemberId(reqDto.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:2029028_1
            getObjectStorageEvidenceReq.setAliyunOssServiceAddress(reqDto.getAliyunOssServiceAddress());//SimpleFieldAssign//sourceId:2029029_1
            getObjectStorageEvidenceReq.setAliyunOssKey(reqDto.getAliyunOssKey());//SimpleFieldAssign//sourceId:2029030_1
            getObjectStorageEvidenceReq.setAliyunOssSecretKey(reqDto.getAliyunOssSecretKey());//SimpleFieldAssign//sourceId:2029031_1
            getObjectStorageEvidenceReq.setAliyunOssRegionName(reqDto.getAliyunOssRegionName());//SimpleFieldAssign//sourceId:2029032_1
            getObjectStorageEvidenceReq.setAliyunOssRoleAuthorizationCode(reqDto.getAliyunOssRoleAuthorizationCode());//SimpleFieldAssign//sourceId:2029033_1
            getObjectStorageEvidenceReq.setAliyunOssTemporaryIdentityExpiration(reqDto.getAliyunOssTemporaryIdentityExpiration());//SimpleFieldAssign//sourceId:2029034_1
        }

        /*M2查询阿里云对象存储临时令牌详情（特殊方法）[10379]   */
        Assert.isNull(getObjectStorageEvidenceReq.getOriginalRoleMemberId(), "D2查询阿里云对象存储临时令牌详情(公共)-M2查询阿里云对象存储临时令牌详情（特殊方法）-身份人员ID不能为空", false);
        Assert.isNull(getObjectStorageEvidenceReq.getAliyunOssServiceAddress(), "D2查询阿里云对象存储临时令牌详情(公共)-M2查询阿里云对象存储临时令牌详情（特殊方法）-阿里云OSS服务地址不能为空", false);
        Assert.isNull(getObjectStorageEvidenceReq.getAliyunOssKey(), "D2查询阿里云对象存储临时令牌详情(公共)-M2查询阿里云对象存储临时令牌详情（特殊方法）-阿里云OSS的钥匙不能为空", false);
        Assert.isNull(getObjectStorageEvidenceReq.getAliyunOssSecretKey(), "D2查询阿里云对象存储临时令牌详情(公共)-M2查询阿里云对象存储临时令牌详情（特殊方法）-阿里云OSS的密钥不能为空", false);
        Assert.isNull(getObjectStorageEvidenceReq.getAliyunOssRegionName(), "D2查询阿里云对象存储临时令牌详情(公共)-M2查询阿里云对象存储临时令牌详情（特殊方法）-阿里云OSS区域名称不能为空", false);
        Assert.isNull(getObjectStorageEvidenceReq.getAliyunOssRoleAuthorizationCode(), "D2查询阿里云对象存储临时令牌详情(公共)-M2查询阿里云对象存储临时令牌详情（特殊方法）-阿里云OSS角色授权code不能为空", false);
        Assert.isNull(getObjectStorageEvidenceReq.getAliyunOssTemporaryIdentityExpiration(), "D2查询阿里云对象存储临时令牌详情(公共)-M2查询阿里云对象存储临时令牌详情（特殊方法）-阿里云OSS临时身份过期时间不能为空", false);
        getObjectStorageEvidenceRes = nbOss.queryObjectStorageTemporaryCredentialsDetail(getObjectStorageEvidenceReq);


        getObjectStorageEvidenceRes_1 = getObjectStorageEvidenceRes;

        QueryObjectStorageTemporaryCredentialsDetailComRespDto retData = new QueryObjectStorageTemporaryCredentialsDetailComRespDto();
        if (getObjectStorageEvidenceRes_1 != null) {
            retData.setAliyunTemporaryIdentityKey(getObjectStorageEvidenceRes_1.getAliyunTemporaryIdentityKey());//SimpleFieldAssign//sourceId:2029047_1
            retData.setAliyunTemporaryIdentitySec(getObjectStorageEvidenceRes_1.getAliyunTemporaryIdentitySec());//SimpleFieldAssign//sourceId:2029048_1
            retData.setAliyunTemporaryIdentityToken(getObjectStorageEvidenceRes_1.getAliyunTemporaryIdentityToken());//SimpleFieldAssign//sourceId:2029049_1
            retData.setAliyunUploadAuthorizationPolicy(getObjectStorageEvidenceRes_1.getAliyunUploadAuthorizationPolicy());//SimpleFieldAssign//sourceId:2029050_1
            retData.setAliyunUploadSignature(getObjectStorageEvidenceRes_1.getAliyunUploadSignature());//SimpleFieldAssign//sourceId:2029051_1
        }


        return retData;
    }

    /**
     * D2查询MINIO临时令牌详情(公共)[10398]
     * gen by moon at 12/3/2024, 10:54:45 AM
     */
    @Trace(operationName = "D2查询MINIO临时令牌详情(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryMinioTemporaryCredentialsDetailComRespDto queryMinioTemporaryCredentialsDetailCom(QueryMinioTemporaryCredentialsDetailComReqDto reqDto) {


        QueryMinoTemporaryCredentialsDetailRespDto getObjectStorageEvidenceRes_1 = null;
//步骤0: M2查询MINIO临时令牌详情（特殊方法） - queryMinoTemporaryCredentialsDetail
        //ModelCode: getObjectStorageEvidence
        QueryMinoTemporaryCredentialsDetailRespDto getObjectStorageEvidenceRes = null;
        QueryMinoTemporaryCredentialsDetailReqDto getObjectStorageEvidenceReq = new QueryMinoTemporaryCredentialsDetailReqDto();
        if (reqDto != null) {
            getObjectStorageEvidenceReq.setMinioServiceAddress(reqDto.getMinioServiceAddress());//SimpleFieldAssign//sourceId:2029063_1
            getObjectStorageEvidenceReq.setMinioKey(reqDto.getMinioKey());//SimpleFieldAssign//sourceId:2029064_1
            getObjectStorageEvidenceReq.setMinioSecretKey(reqDto.getMinioSecretKey());//SimpleFieldAssign//sourceId:2029065_1
            getObjectStorageEvidenceReq.setMinioRegionName(reqDto.getMinioRegionName());//SimpleFieldAssign//sourceId:2029066_1
            getObjectStorageEvidenceReq.setMinioRoleAuthorizationCode(reqDto.getMinioRoleAuthorizationCode());//SimpleFieldAssign//sourceId:2029067_1
            getObjectStorageEvidenceReq.setMinioTemporaryIdentityExpiration(reqDto.getMinioTemporaryIdentityExpiration());//SimpleFieldAssign//sourceId:2029068_1
            getObjectStorageEvidenceReq.setPolicy(reqDto.getPolicy());//SimpleFieldAssign//sourceId:2029073_1
            getObjectStorageEvidenceReq.setOriginalRoleMemberId(reqDto.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:2029069_1
        }

        /*M2查询MINIO临时令牌详情（特殊方法）[10397]   */
        Assert.isNull(getObjectStorageEvidenceReq.getMinioServiceAddress(), "D2查询MINIO临时令牌详情(公共)-M2查询MINIO临时令牌详情（特殊方法）-MINIO服务地址不能为空", false);
        Assert.isNull(getObjectStorageEvidenceReq.getMinioKey(), "D2查询MINIO临时令牌详情(公共)-M2查询MINIO临时令牌详情（特殊方法）-MINIO的钥匙不能为空", false);
        Assert.isNull(getObjectStorageEvidenceReq.getMinioSecretKey(), "D2查询MINIO临时令牌详情(公共)-M2查询MINIO临时令牌详情（特殊方法）-MINIO的密钥不能为空", false);
        Assert.isNull(getObjectStorageEvidenceReq.getMinioRegionName(), "D2查询MINIO临时令牌详情(公共)-M2查询MINIO临时令牌详情（特殊方法）-MINIO区域名称不能为空", false);
        Assert.isNull(getObjectStorageEvidenceReq.getMinioRoleAuthorizationCode(), "D2查询MINIO临时令牌详情(公共)-M2查询MINIO临时令牌详情（特殊方法）-MINIO角色授权code不能为空", false);
        Assert.isNull(getObjectStorageEvidenceReq.getMinioTemporaryIdentityExpiration(), "D2查询MINIO临时令牌详情(公共)-M2查询MINIO临时令牌详情（特殊方法）-MINIO临时身份过期时间不能为空", false);
        Assert.isNull(getObjectStorageEvidenceReq.getPolicy(), "D2查询MINIO临时令牌详情(公共)-M2查询MINIO临时令牌详情（特殊方法）-MINIO权限策略不能为空", false);
        Assert.isNull(getObjectStorageEvidenceReq.getOriginalRoleMemberId(), "D2查询MINIO临时令牌详情(公共)-M2查询MINIO临时令牌详情（特殊方法）-身份人员ID不能为空", false);
        getObjectStorageEvidenceRes = nbOss.queryMinoTemporaryCredentialsDetail(getObjectStorageEvidenceReq);


        getObjectStorageEvidenceRes_1 = getObjectStorageEvidenceRes;

        QueryMinioTemporaryCredentialsDetailComRespDto retData = new QueryMinioTemporaryCredentialsDetailComRespDto();
        if (getObjectStorageEvidenceRes_1 != null) {
            retData.setMinioTemporaryIdentityKey(getObjectStorageEvidenceRes_1.getMinioTemporaryIdentityKey());//SimpleFieldAssign//sourceId:2029082_1
            retData.setMinioTemporaryIdentitySecret(getObjectStorageEvidenceRes_1.getMinioTemporaryIdentitySecret());//SimpleFieldAssign//sourceId:2029083_1
            retData.setMinioTemporaryIdentityToken(getObjectStorageEvidenceRes_1.getMinioTemporaryIdentityToken());//SimpleFieldAssign//sourceId:2029084_1
        }


        return retData;
    }

    /**
     * D2新增阿里云临时令牌(redis)(公共)[10401]
     * gen by moon at 12/7/2024, 1:41:39 PM
     */
    @Trace(operationName = "D2新增阿里云临时令牌(redis)(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public AddAliTemporaryCredentialsComRespDto addAliTemporaryCredentialsCom(AddAliTemporaryCredentialsComReqDto reqDto) {


        //步骤0: D2-新增redis业务数据对象（业务原子） - addRedisBusinessDataSetCom
        AddRedisBusinessDataSetComRespDto addRedisBusinessDataSetComRespDto = null;
        AddRedisBusinessDataSetComReqDto addRedisBusinessDataSetComReqDto = new AddRedisBusinessDataSetComReqDto();
        addRedisBusinessDataSetComReqDto.setRedisDataObjectCatalogue("存储服务令牌");//sourceId:2029210_1
        addRedisBusinessDataSetComReqDto.setIsDeleteRedis("TRUE");//sourceId:2029209_1
        addRedisBusinessDataSetComReqDto.setDuration(Long.valueOf(300));//CUSTOM_CONVENTION//sourceId:2029211_1
        addRedisBusinessDataSetComReqDto.setTimeUnitType("SECOND");//sourceId:2029212_1
        addRedisBusinessDataSetComReqDto.setIsDataList("TRUE");//sourceId:2029106_1
        addRedisBusinessDataSetComReqDto.setCustomField1("aliyunTemporaryIdentityKey");//CUSTOM_CONVENTION//sourceId:2029108_1
        addRedisBusinessDataSetComReqDto.setCustomField2("aliyunTemporaryIdentitySec");//CUSTOM_CONVENTION//sourceId:2029110_1
        addRedisBusinessDataSetComReqDto.setCustomField3("aliyunTemporaryIdentityToken");//CUSTOM_CONVENTION//sourceId:2029112_1
        addRedisBusinessDataSetComReqDto.setCustomField4("aliyunUploadAuthorizationPolicy");//CUSTOM_CONVENTION//sourceId:2029114_1
        addRedisBusinessDataSetComReqDto.setCustomField5("aliyunUploadSignature");//CUSTOM_CONVENTION//sourceId:2029116_1
        if (reqDto != null) {
            addRedisBusinessDataSetComReqDto.setBusinessDataObject(reqDto.getBusinessDataObject());//SimpleFieldAssign//sourceId:2029107_1
            addRedisBusinessDataSetComReqDto.setDataObjectBatchCode(reqDto.getDataObjectBatchCode());//SimpleFieldAssign//sourceId:2029208_1
            addRedisBusinessDataSetComReqDto.setCustomFieldValue1(reqDto.getCustomFieldValue1());//SimpleFieldAssign//sourceId:2029109_1
            addRedisBusinessDataSetComReqDto.setCustomFieldValue2(reqDto.getCustomFieldValue2());//SimpleFieldAssign//sourceId:2029111_1
            addRedisBusinessDataSetComReqDto.setCustomFieldValue3(reqDto.getCustomFieldValue3());//SimpleFieldAssign//sourceId:2029113_1
            addRedisBusinessDataSetComReqDto.setCustomFieldValue4(reqDto.getCustomFieldValue4());//SimpleFieldAssign//sourceId:2029115_1
            addRedisBusinessDataSetComReqDto.setCustomFieldValue5(reqDto.getCustomFieldValue5());//SimpleFieldAssign//sourceId:2029225_1
        }

        /*D2-新增redis业务数据对象（业务原子）[8399]   */
        Assert.isNull(addRedisBusinessDataSetComReqDto.getBusinessDataObject(), "D2新增阿里云临时令牌(redis)(公共)-D2-新增redis业务数据对象（业务原子）-业务数据对象不能为空", false);
        Assert.isNull(addRedisBusinessDataSetComReqDto.getRedisDataObjectCatalogue(), "D2新增阿里云临时令牌(redis)(公共)-D2-新增redis业务数据对象（业务原子）-Redis数据对象目录不能为空", false);
        Assert.isNull(addRedisBusinessDataSetComReqDto.getIsDataList(), "D2新增阿里云临时令牌(redis)(公共)-D2-新增redis业务数据对象（业务原子）-是否是数据集对象不能为空", false);
        addRedisBusinessDataSetComRespDto = businessAtomService.addRedisBusinessDataSetCom(addRedisBusinessDataSetComReqDto)/*vcase invoke isSameApp*/;


        AddAliTemporaryCredentialsComRespDto retData = new AddAliTemporaryCredentialsComRespDto();


        return retData;
    }

    /**
     * D2查询对象存储Redis临时令牌详情(公共)[10382]
     * gen by moon at 12/7/2024, 1:41:40 PM
     */
    @Trace(operationName = "D2查询对象存储Redis临时令牌详情(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryObjectStorageRedisTemporaryTokenDetailComRespDto queryObjectStorageRedisTemporaryTokenDetailCom(QueryObjectStorageRedisTemporaryTokenDetailComReqDto reqDto) {


        QueryObjectStorageRedisTemporaryTokenDetailComRespDto retData = new QueryObjectStorageRedisTemporaryTokenDetailComRespDto();
        //todo dong 未找到匹配生成策略,请检查生成策略retData.setAliyunTemporaryIdentityKey(),数据源项; to( ==>tableName:custom_fields_3, fieldEnname:aliyunTemporaryIdentityKey ,uniqueId: 2031059_1 uniqueSourceId:out_2031048_1) from (varName:undefined fieldundefined)
//todo dong 未找到匹配生成策略,请检查生成策略retData.setAliyunTemporaryIdentitySec(),数据源项; to( ==>tableName:custom_fields_3, fieldEnname:aliyunTemporaryIdentitySec ,uniqueId: 2031060_1 uniqueSourceId:out_2031049_1) from (varName:undefined fieldundefined)
//todo dong 未找到匹配生成策略,请检查生成策略retData.setAliyunTemporaryIdentityToken(),数据源项; to( ==>tableName:custom_fields_3, fieldEnname:aliyunTemporaryIdentityToken ,uniqueId: 2031061_1 uniqueSourceId:out_2031050_1) from (varName:undefined fieldundefined)
//todo dong 未找到匹配生成策略,请检查生成策略retData.setAliyunUploadAuthorizationPolicy(),数据源项; to( ==>tableName:custom_fields_3, fieldEnname:aliyunUploadAuthorizationPolicy ,uniqueId: 2031062_1 uniqueSourceId:out_2031051_1) from (varName:undefined fieldundefined)
//todo dong 未找到匹配生成策略,请检查生成策略retData.setAliyunUploadSignature(),数据源项; to( ==>tableName:custom_fields_3, fieldEnname:aliyunUploadSignature ,uniqueId: 2031063_1 uniqueSourceId:out_2031052_1) from (varName:undefined fieldundefined)
//todo dong 未找到匹配生成策略,请检查生成策略retData.setMinioTemporaryIdentityKey(),数据源项; to( ==>tableName:custom_fields_3, fieldEnname:minioTemporaryIdentityKey ,uniqueId: 2031064_1 uniqueSourceId:out_2031054_1) from (varName:undefined fieldundefined)
//todo dong 未找到匹配生成策略,请检查生成策略retData.setMinioTemporaryIdentitySecret(),数据源项; to( ==>tableName:custom_fields_3, fieldEnname:minioTemporaryIdentitySecret ,uniqueId: 2031065_1 uniqueSourceId:out_2031055_1) from (varName:undefined fieldundefined)
//todo dong 未找到匹配生成策略,请检查生成策略retData.setMinioTemporaryIdentityToken(),数据源项; to( ==>tableName:custom_fields_3, fieldEnname:minioTemporaryIdentityToken ,uniqueId: 2031066_1 uniqueSourceId:out_2031056_1) from (varName:undefined fieldundefined)
//todo dong 未找到匹配生成策略,请检查生成策略retData.setMinioTemporaryUploadUrl(),数据源项; to( ==>tableName:custom_fields_3, fieldEnname:minioTemporaryUploadUrl ,uniqueId: 2031067_1 uniqueSourceId:out_2031057_1) from (varName:undefined fieldundefined)


        return retData;
    }

    /**
     * D2查询MINIOURL临时令牌详情(公共)[10400]
     * gen by moon at 12/6/2024, 10:02:02 PM
     */
    @Trace(operationName = "D2查询MINIOURL临时令牌详情(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryMinoUrlTemporaryCredentialsDetailComRespDto queryMinoUrlTemporaryCredentialsDetailCom(QueryMinoUrlTemporaryCredentialsDetailComReqDto reqDto) {


        QueryMinioUrlTemporaryCredentialsDetailRespDto queryMinioTemporaryUploadAddressRes_1 = null;
//步骤0: M2查询MINIOURL临时令牌详情（特殊方法） - queryMinioUrlTemporaryCredentialsDetail
        //ModelCode: queryMinioTemporaryUploadAddress
        QueryMinioUrlTemporaryCredentialsDetailRespDto queryMinioTemporaryUploadAddressRes = null;
        QueryMinioUrlTemporaryCredentialsDetailReqDto queryMinioTemporaryUploadAddressReq = new QueryMinioUrlTemporaryCredentialsDetailReqDto();
        if (reqDto != null) {
            queryMinioTemporaryUploadAddressReq.setMinioServiceAddress(reqDto.getMinioServiceAddress());//SimpleFieldAssign//sourceId:2029092_1
            queryMinioTemporaryUploadAddressReq.setMinioKey(reqDto.getMinioKey());//SimpleFieldAssign//sourceId:2029093_1
            queryMinioTemporaryUploadAddressReq.setMinioSecretKey(reqDto.getMinioSecretKey());//SimpleFieldAssign//sourceId:2029094_1
            queryMinioTemporaryUploadAddressReq.setMinioTemporaryIdentityExpiration(reqDto.getMinioTemporaryIdentityExpiration());//SimpleFieldAssign//sourceId:2029095_1
            queryMinioTemporaryUploadAddressReq.setMinioBucketName(reqDto.getMinioBucketName());//SimpleFieldAssign//sourceId:2029096_1
            queryMinioTemporaryUploadAddressReq.setMinioUploadFileObjectName(reqDto.getMinioUploadFileObjectName());//SimpleFieldAssign//sourceId:2029097_1
        }

        /*M2查询MINIOURL临时令牌详情（特殊方法）[10399]   */
        Assert.isNull(queryMinioTemporaryUploadAddressReq.getMinioServiceAddress(), "D2查询MINIOURL临时令牌详情(公共)-M2查询MINIOURL临时令牌详情（特殊方法）-MINIO服务地址不能为空", false);
        Assert.isNull(queryMinioTemporaryUploadAddressReq.getMinioKey(), "D2查询MINIOURL临时令牌详情(公共)-M2查询MINIOURL临时令牌详情（特殊方法）-MINIO的钥匙不能为空", false);
        Assert.isNull(queryMinioTemporaryUploadAddressReq.getMinioSecretKey(), "D2查询MINIOURL临时令牌详情(公共)-M2查询MINIOURL临时令牌详情（特殊方法）-MINIO的密钥不能为空", false);
        Assert.isNull(queryMinioTemporaryUploadAddressReq.getMinioTemporaryIdentityExpiration(), "D2查询MINIOURL临时令牌详情(公共)-M2查询MINIOURL临时令牌详情（特殊方法）-MINIO临时身份过期时间不能为空", false);
        Assert.isNull(queryMinioTemporaryUploadAddressReq.getMinioBucketName(), "D2查询MINIOURL临时令牌详情(公共)-M2查询MINIOURL临时令牌详情（特殊方法）-MINIO桶名字不能为空", false);
        Assert.isNull(queryMinioTemporaryUploadAddressReq.getMinioUploadFileObjectName(), "D2查询MINIOURL临时令牌详情(公共)-M2查询MINIOURL临时令牌详情（特殊方法）-MINIO上传文件对象名不能为空", false);
        queryMinioTemporaryUploadAddressRes = nbOss.queryMinioUrlTemporaryCredentialsDetail(queryMinioTemporaryUploadAddressReq);


        queryMinioTemporaryUploadAddressRes_1 = queryMinioTemporaryUploadAddressRes;

        QueryMinoUrlTemporaryCredentialsDetailComRespDto retData = new QueryMinoUrlTemporaryCredentialsDetailComRespDto();
        if (queryMinioTemporaryUploadAddressRes_1 != null) {
            retData.setMinioTemporaryUploadUrl(queryMinioTemporaryUploadAddressRes_1.getMinioTemporaryUploadUrl());//SimpleFieldAssign//sourceId:2029105_1
        }


        return retData;
    }

    /**
     * D2新增MINIO临时令牌或临时上传地址(redis)(公共)[10402]
     * gen by moon at 12/4/2024, 7:22:35 AM
     */
    @Trace(operationName = "D2新增MINIO临时令牌或临时上传地址(redis)(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public AddMinioTemporaryCredentialsOrUrlComRespDto addMinioTemporaryCredentialsOrUrlCom(AddMinioTemporaryCredentialsOrUrlComReqDto reqDto) {


        //步骤0: D2-新增redis业务数据对象（业务原子） - addRedisBusinessDataSetCom
        AddRedisBusinessDataSetComRespDto addRedisBusinessDataSetComRespDto = null;
        AddRedisBusinessDataSetComReqDto addRedisBusinessDataSetComReqDto = new AddRedisBusinessDataSetComReqDto();
        addRedisBusinessDataSetComReqDto.setRedisDataObjectCatalogue("存储服务令牌");//sourceId:2029345_1
        addRedisBusinessDataSetComReqDto.setIsDeleteRedis("FALSE");//sourceId:2029344_1
        addRedisBusinessDataSetComReqDto.setDuration(Long.valueOf(300));//CUSTOM_CONVENTION//sourceId:2029346_1
        addRedisBusinessDataSetComReqDto.setTimeUnitType("SECOND");//sourceId:2029347_1
        addRedisBusinessDataSetComReqDto.setIsDataList("FALSE");//sourceId:2029241_1
        addRedisBusinessDataSetComReqDto.setCustomField1("minioTemporaryIdentityKey");//CUSTOM_CONVENTION//sourceId:2029243_1
        addRedisBusinessDataSetComReqDto.setCustomField2("minioTemporaryIdentitySecret");//CUSTOM_CONVENTION//sourceId:2029245_1
        addRedisBusinessDataSetComReqDto.setCustomField3("minioTemporaryIdentityToken");//CUSTOM_CONVENTION//sourceId:2029247_1
        addRedisBusinessDataSetComReqDto.setCustomField4("minioTemporaryUploadUrl");//CUSTOM_CONVENTION//sourceId:2029249_1
        if (reqDto != null) {
            addRedisBusinessDataSetComReqDto.setBusinessDataObject(reqDto.getBusinessDataObject());//SimpleFieldAssign//sourceId:2029242_1
            addRedisBusinessDataSetComReqDto.setDataObjectBatchCode(reqDto.getDataObjectBatchCode());//SimpleFieldAssign//sourceId:2029343_1
            addRedisBusinessDataSetComReqDto.setCustomFieldValue1(reqDto.getCustomFieldValue1());//SimpleFieldAssign//sourceId:2029244_1
            addRedisBusinessDataSetComReqDto.setCustomFieldValue2(reqDto.getCustomFieldValue2());//SimpleFieldAssign//sourceId:2029246_1
            addRedisBusinessDataSetComReqDto.setCustomFieldValue3(reqDto.getCustomFieldValue3());//SimpleFieldAssign//sourceId:2029248_1
            addRedisBusinessDataSetComReqDto.setCustomFieldValue4(reqDto.getCustomFieldValue4());//SimpleFieldAssign//sourceId:2029250_1
        }

        /*D2-新增redis业务数据对象（业务原子）[8399]   */
        Assert.isNull(addRedisBusinessDataSetComReqDto.getBusinessDataObject(), "D2新增MINIO临时令牌或临时上传地址(redis)(公共)-D2-新增redis业务数据对象（业务原子）-业务数据对象不能为空", false);
        Assert.isNull(addRedisBusinessDataSetComReqDto.getRedisDataObjectCatalogue(), "D2新增MINIO临时令牌或临时上传地址(redis)(公共)-D2-新增redis业务数据对象（业务原子）-Redis数据对象目录不能为空", false);
        Assert.isNull(addRedisBusinessDataSetComReqDto.getIsDataList(), "D2新增MINIO临时令牌或临时上传地址(redis)(公共)-D2-新增redis业务数据对象（业务原子）-是否是数据集对象不能为空", false);
        addRedisBusinessDataSetComRespDto = businessAtomService.addRedisBusinessDataSetCom(addRedisBusinessDataSetComReqDto)/*vcase invoke isSameApp*/;


        AddMinioTemporaryCredentialsOrUrlComRespDto retData = new AddMinioTemporaryCredentialsOrUrlComRespDto();


        return retData;
    }

    /**
     * D2查询阿里云临时令牌详情(redis)(公共)[10403]
     * gen by moon at 12/7/2024, 1:41:38 PM
     */
    @Trace(operationName = "D2查询阿里云临时令牌详情(redis)(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryAliTemporaryCredentialsFromRedisDetailComRespDto queryAliTemporaryCredentialsFromRedisDetailCom(QueryAliTemporaryCredentialsFromRedisDetailComReqDto reqDto) {


        QueryRefRedisBusinessDataSetDetailComRespDto queryRefRedisBusinessDataSetDetailComRespDto_1 = null;
//步骤0: D2-查询入参redis业务数据对象详情（业务原子） - queryRefRedisBusinessDataSetDetailCom
        QueryRefRedisBusinessDataSetDetailComRespDto queryRefRedisBusinessDataSetDetailComRespDto = null;
        QueryRefRedisBusinessDataSetDetailComReqDto queryRefRedisBusinessDataSetDetailComReqDto = new QueryRefRedisBusinessDataSetDetailComReqDto();
        queryRefRedisBusinessDataSetDetailComReqDto.setRedisDataObjectCatalogue("存储服务令牌");//sourceId:2029587_1
        queryRefRedisBusinessDataSetDetailComReqDto.setCustomField1("aliyunTemporaryIdentityKey");//CUSTOM_CONVENTION//sourceId:2034083_1
        queryRefRedisBusinessDataSetDetailComReqDto.setCustomField2("aliyunTemporaryIdentitySec");//CUSTOM_CONVENTION//sourceId:2034084_1
        queryRefRedisBusinessDataSetDetailComReqDto.setCustomField3("aliyunTemporaryIdentityToken");//CUSTOM_CONVENTION//sourceId:2034085_1
        queryRefRedisBusinessDataSetDetailComReqDto.setCustomField4("aliyunUploadAuthorizationPolicy");//CUSTOM_CONVENTION//sourceId:2034086_1
        queryRefRedisBusinessDataSetDetailComReqDto.setCustomField5("aliyunUploadSignature");//CUSTOM_CONVENTION//sourceId:2034087_1
        if (reqDto != null) {
            queryRefRedisBusinessDataSetDetailComReqDto.setBusinessDataObject(reqDto.getBusinessDataObject());//SimpleFieldAssign//sourceId:2029469_1
        }

        /*D2-查询入参redis业务数据对象详情（业务原子）[8476]   */
        Assert.isNull(queryRefRedisBusinessDataSetDetailComReqDto.getBusinessDataObject(), "D2查询阿里云临时令牌详情(redis)(公共)-D2-查询入参redis业务数据对象详情（业务原子）-业务数据对象不能为空", false);
        Assert.isNull(queryRefRedisBusinessDataSetDetailComReqDto.getRedisDataObjectCatalogue(), "D2查询阿里云临时令牌详情(redis)(公共)-D2-查询入参redis业务数据对象详情（业务原子）-Redis数据对象目录不能为空", false);
        queryRefRedisBusinessDataSetDetailComRespDto = businessAtomService.queryRefRedisBusinessDataSetDetailCom(queryRefRedisBusinessDataSetDetailComReqDto)/*vcase invoke isSameApp*/;


        queryRefRedisBusinessDataSetDetailComRespDto_1 = queryRefRedisBusinessDataSetDetailComRespDto;

        QueryAliTemporaryCredentialsFromRedisDetailComRespDto retData = new QueryAliTemporaryCredentialsFromRedisDetailComRespDto();
        if (queryRefRedisBusinessDataSetDetailComRespDto_1 != null) {
            retData.setAliyunTemporaryIdentityKey(queryRefRedisBusinessDataSetDetailComRespDto_1.getCustomField1());//SimpleFieldAssign//sourceId:2029608_1
            retData.setAliyunTemporaryIdentitySec(queryRefRedisBusinessDataSetDetailComRespDto_1.getCustomField2());//SimpleFieldAssign//sourceId:2029609_1
            retData.setAliyunTemporaryIdentityToken(queryRefRedisBusinessDataSetDetailComRespDto_1.getCustomField3());//SimpleFieldAssign//sourceId:2029610_1
            retData.setAliyunUploadAuthorizationPolicy(queryRefRedisBusinessDataSetDetailComRespDto_1.getCustomField4());//SimpleFieldAssign//sourceId:2029611_1
            retData.setAliyunUploadSignature(queryRefRedisBusinessDataSetDetailComRespDto_1.getCustomField5());//SimpleFieldAssign//sourceId:2029612_1
        }


        return retData;
    }

    /**
     * D2查询MINIO临时令牌详情(redis)(公共)[10405]
     * gen by moon at 12/4/2024, 7:22:57 AM
     */
    @Trace(operationName = "D2查询MINIO临时令牌详情(redis)(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryMinioTemporaryCredentialsDetailFromRedisComRespDto queryMinioTemporaryCredentialsDetailFromRedisCom(QueryMinioTemporaryCredentialsDetailFromRedisComReqDto reqDto) {


        QueryRefRedisBusinessDataSetDetailComRespDto queryRefRedisBusinessDataSetDetailComRespDto_1 = null;
//步骤0: D2-查询入参redis业务数据对象详情（业务原子） - queryRefRedisBusinessDataSetDetailCom
        QueryRefRedisBusinessDataSetDetailComRespDto queryRefRedisBusinessDataSetDetailComRespDto = null;
        QueryRefRedisBusinessDataSetDetailComReqDto queryRefRedisBusinessDataSetDetailComReqDto = new QueryRefRedisBusinessDataSetDetailComReqDto();
        queryRefRedisBusinessDataSetDetailComReqDto.setRedisDataObjectCatalogue("存储服务令牌");//sourceId:2029747_1
        if (reqDto != null) {
            queryRefRedisBusinessDataSetDetailComReqDto.setBusinessDataObject(reqDto.getBusinessDataObject());//SimpleFieldAssign//sourceId:2029746_1
        }

        /*D2-查询入参redis业务数据对象详情（业务原子）[8476]   */
        Assert.isNull(queryRefRedisBusinessDataSetDetailComReqDto.getBusinessDataObject(), "D2查询MINIO临时令牌详情(redis)(公共)-D2-查询入参redis业务数据对象详情（业务原子）-业务数据对象不能为空", false);
        Assert.isNull(queryRefRedisBusinessDataSetDetailComReqDto.getRedisDataObjectCatalogue(), "D2查询MINIO临时令牌详情(redis)(公共)-D2-查询入参redis业务数据对象详情（业务原子）-Redis数据对象目录不能为空", false);
        queryRefRedisBusinessDataSetDetailComRespDto = businessAtomService.queryRefRedisBusinessDataSetDetailCom(queryRefRedisBusinessDataSetDetailComReqDto)/*vcase invoke isSameApp*/;


        queryRefRedisBusinessDataSetDetailComRespDto_1 = queryRefRedisBusinessDataSetDetailComRespDto;

        QueryMinioTemporaryCredentialsDetailFromRedisComRespDto retData = new QueryMinioTemporaryCredentialsDetailFromRedisComRespDto();
        if (queryRefRedisBusinessDataSetDetailComRespDto_1 != null) {
            retData.setMinioTemporaryIdentityKey(queryRefRedisBusinessDataSetDetailComRespDto_1.getCustomField1());//SimpleFieldAssign//sourceId:2029753_1
            retData.setMinioTemporaryIdentitySecret(queryRefRedisBusinessDataSetDetailComRespDto_1.getCustomField2());//SimpleFieldAssign//sourceId:2029754_1
            retData.setMinioTemporaryIdentityToken(queryRefRedisBusinessDataSetDetailComRespDto_1.getCustomField3());//SimpleFieldAssign//sourceId:2029755_1
            retData.setMinioTemporaryUploadUrl(queryRefRedisBusinessDataSetDetailComRespDto_1.getCustomField4());//SimpleFieldAssign//sourceId:2029756_1
        }


        return retData;
    }

    /**
     * D2查询对象存储临时令牌详情(公共)[10409]
     * gen by moon at 12/12/2024, 4:29:40 PM
     */
    @Trace(operationName = "D2查询对象存储临时令牌详情(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryStorageTemporaryCredentialsDetailComRespDto queryStorageTemporaryCredentialsDetailCom(QueryStorageTemporaryCredentialsDetailComReqDto reqDto) {


        AddObjectStorageConfigRespDto receptionServiceRes_1 = null;
        QueryMemorysBusinessDataListComRespDto queryMemorysBusinessDataListComRespDto_1 = null;
//virtualUsage D2查询上传配置信息详情(公共)  73596
        QueryUploadConfigInfoDetailComRespDto queryUploadConfigInfoDetailComRespDto = null;
        QueryUploadConfigInfoDetailComReqDto queryUploadConfigInfoDetailComReqDto = new QueryUploadConfigInfoDetailComReqDto();


        /*D2查询上传配置信息详情(公共)[10408]   */

        queryUploadConfigInfoDetailComRespDto = netDiskService.queryUploadConfigInfoDetailCom(queryUploadConfigInfoDetailComReqDto)/*vcase invoke isSameApp*/;


        if ((queryUploadConfigInfoDetailComRespDto != null && queryUploadConfigInfoDetailComRespDto.getUploadType() != null && queryUploadConfigInfoDetailComRespDto.getUploadType().equals("ALI_MODEL"))) {
            //if(D2查询上传配置信息详情(公共).上传类型 等于 阿里模式)  73602

            QueryAliTemporaryCredentialsFromRedisDetailComRespDto queryAliTemporaryCredentialsFromRedisDetailComRespDto = null;
            QueryAliTemporaryCredentialsFromRedisDetailComReqDto queryAliTemporaryCredentialsFromRedisDetailComReqDto = new QueryAliTemporaryCredentialsFromRedisDetailComReqDto();
            if (reqDto != null) {
                queryAliTemporaryCredentialsFromRedisDetailComReqDto.setBusinessDataObject(reqDto.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:2034088_1_73701
            }

            /*D2查询阿里云临时令牌详情(redis)(公共)[10403]   */
            Assert.isNull(queryAliTemporaryCredentialsFromRedisDetailComReqDto.getBusinessDataObject(), "D2查询对象存储临时令牌详情(公共)-D2查询阿里云临时令牌详情(redis)(公共)-业务数据对象不能为空", false);
            queryAliTemporaryCredentialsFromRedisDetailComRespDto = queryAliTemporaryCredentialsFromRedisDetailCom(queryAliTemporaryCredentialsFromRedisDetailComReqDto)/*vcase invoke 同服务,同domain*/;


            if ((queryAliTemporaryCredentialsFromRedisDetailComRespDto != null && queryAliTemporaryCredentialsFromRedisDetailComRespDto.getAliyunTemporaryIdentityKey() == null)) {
                //if(D2查询阿里云临时令牌详情(redis)(公共).阿里云返回临时身份key值 值等于空 )  73688

                QueryObjectStorageTemporaryCredentialsDetailComRespDto queryObjectStorageTemporaryCredentialsDetailComRespDto = null;
                if (queryUploadConfigInfoDetailComRespDto != null) {
                    QueryObjectStorageTemporaryCredentialsDetailComReqDto queryObjectStorageTemporaryCredentialsDetailComReqDto = new QueryObjectStorageTemporaryCredentialsDetailComReqDto();
                    queryObjectStorageTemporaryCredentialsDetailComReqDto.setOriginalRoleMemberId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecOriginalRoleMemberId());//CURRENT_ORIGINAL_ROLE_MEMBERID//sourceId:2031185_1_73689
                    if (queryUploadConfigInfoDetailComRespDto != null) {
                        queryObjectStorageTemporaryCredentialsDetailComReqDto.setAliyunOssServiceAddress(queryUploadConfigInfoDetailComRespDto.getAliyunOssServiceAddress());//SimpleFieldAssign//sourceId:2031186_1_73689
                        queryObjectStorageTemporaryCredentialsDetailComReqDto.setAliyunOssKey(queryUploadConfigInfoDetailComRespDto.getAliyunOssKey());//SimpleFieldAssign//sourceId:2031187_1_73689
                        queryObjectStorageTemporaryCredentialsDetailComReqDto.setAliyunOssSecretKey(queryUploadConfigInfoDetailComRespDto.getAliyunOssSecretKey());//SimpleFieldAssign//sourceId:2031188_1_73689
                        queryObjectStorageTemporaryCredentialsDetailComReqDto.setAliyunOssRegionName(queryUploadConfigInfoDetailComRespDto.getAliyunOssRegionName());//SimpleFieldAssign//sourceId:2031189_1_73689
                        queryObjectStorageTemporaryCredentialsDetailComReqDto.setAliyunOssRoleAuthorizationCode(queryUploadConfigInfoDetailComRespDto.getAliyunOssRoleAuthorizationCode());//SimpleFieldAssign//sourceId:2031190_1_73689
                        queryObjectStorageTemporaryCredentialsDetailComReqDto.setAliyunOssTemporaryIdentityExpiration(queryUploadConfigInfoDetailComRespDto.getAliyunOssTemporaryIdentityExpiration());//SimpleFieldAssign//sourceId:2031191_1_73689
                    }

                    /*D2查询阿里云对象存储临时令牌详情(公共)[10380]   */
                    Assert.isNull(queryObjectStorageTemporaryCredentialsDetailComReqDto.getOriginalRoleMemberId(), "D2查询对象存储临时令牌详情(公共)-D2查询阿里云对象存储临时令牌详情(公共)-身份人员ID不能为空", false);
                    Assert.isNull(queryObjectStorageTemporaryCredentialsDetailComReqDto.getAliyunOssServiceAddress(), "D2查询对象存储临时令牌详情(公共)-D2查询阿里云对象存储临时令牌详情(公共)-阿里云OSS服务地址不能为空", false);
                    Assert.isNull(queryObjectStorageTemporaryCredentialsDetailComReqDto.getAliyunOssKey(), "D2查询对象存储临时令牌详情(公共)-D2查询阿里云对象存储临时令牌详情(公共)-阿里云OSS的钥匙不能为空", false);
                    Assert.isNull(queryObjectStorageTemporaryCredentialsDetailComReqDto.getAliyunOssSecretKey(), "D2查询对象存储临时令牌详情(公共)-D2查询阿里云对象存储临时令牌详情(公共)-阿里云OSS的密钥不能为空", false);
                    Assert.isNull(queryObjectStorageTemporaryCredentialsDetailComReqDto.getAliyunOssRegionName(), "D2查询对象存储临时令牌详情(公共)-D2查询阿里云对象存储临时令牌详情(公共)-阿里云OSS区域名称不能为空", false);
                    Assert.isNull(queryObjectStorageTemporaryCredentialsDetailComReqDto.getAliyunOssRoleAuthorizationCode(), "D2查询对象存储临时令牌详情(公共)-D2查询阿里云对象存储临时令牌详情(公共)-阿里云OSS角色授权code不能为空", false);
                    Assert.isNull(queryObjectStorageTemporaryCredentialsDetailComReqDto.getAliyunOssTemporaryIdentityExpiration(), "D2查询对象存储临时令牌详情(公共)-D2查询阿里云对象存储临时令牌详情(公共)-阿里云OSS临时身份过期时间不能为空", false);
                    queryObjectStorageTemporaryCredentialsDetailComRespDto = queryObjectStorageTemporaryCredentialsDetailCom(queryObjectStorageTemporaryCredentialsDetailComReqDto)/*vcase invoke 同服务,同domain*/;


                }
                AddAliTemporaryCredentialsComRespDto addAliTemporaryCredentialsComRespDto = null;
                if (queryObjectStorageTemporaryCredentialsDetailComRespDto != null) {
                    AddAliTemporaryCredentialsComReqDto addAliTemporaryCredentialsComReqDto = new AddAliTemporaryCredentialsComReqDto();
                    if (reqDto != null) {
                        addAliTemporaryCredentialsComReqDto.setBusinessDataObject(reqDto.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:2031172_1_73692
                    }
                    if (queryObjectStorageTemporaryCredentialsDetailComRespDto != null) {
                        addAliTemporaryCredentialsComReqDto.setCustomFieldValue1(queryObjectStorageTemporaryCredentialsDetailComRespDto.getAliyunTemporaryIdentityKey());//SimpleFieldAssign//sourceId:2031174_1_73692
                        addAliTemporaryCredentialsComReqDto.setCustomFieldValue2(queryObjectStorageTemporaryCredentialsDetailComRespDto.getAliyunTemporaryIdentitySec());//SimpleFieldAssign//sourceId:2031175_1_73692
                        addAliTemporaryCredentialsComReqDto.setCustomFieldValue3(queryObjectStorageTemporaryCredentialsDetailComRespDto.getAliyunTemporaryIdentityToken());//SimpleFieldAssign//sourceId:2031176_1_73692
                        addAliTemporaryCredentialsComReqDto.setCustomFieldValue4(queryObjectStorageTemporaryCredentialsDetailComRespDto.getAliyunUploadAuthorizationPolicy());//SimpleFieldAssign//sourceId:2031177_1_73692
                        addAliTemporaryCredentialsComReqDto.setCustomFieldValue5(queryObjectStorageTemporaryCredentialsDetailComRespDto.getAliyunUploadSignature());//SimpleFieldAssign//sourceId:2031178_1_73692
                    }

                    /*D2新增阿里云临时令牌(redis)(公共)[10401]   */
                    Assert.isNull(addAliTemporaryCredentialsComReqDto.getBusinessDataObject(), "D2查询对象存储临时令牌详情(公共)-D2新增阿里云临时令牌(redis)(公共)-业务数据对象不能为空", false);
                    Assert.isNull(addAliTemporaryCredentialsComReqDto.getCustomFieldValue1(), "D2查询对象存储临时令牌详情(公共)-D2新增阿里云临时令牌(redis)(公共)-自定义字段值1不能为空", false);
                    Assert.isNull(addAliTemporaryCredentialsComReqDto.getCustomFieldValue2(), "D2查询对象存储临时令牌详情(公共)-D2新增阿里云临时令牌(redis)(公共)-自定义字段值2不能为空", false);
                    Assert.isNull(addAliTemporaryCredentialsComReqDto.getCustomFieldValue3(), "D2查询对象存储临时令牌详情(公共)-D2新增阿里云临时令牌(redis)(公共)-自定义字段值3不能为空", false);
                    Assert.isNull(addAliTemporaryCredentialsComReqDto.getCustomFieldValue4(), "D2查询对象存储临时令牌详情(公共)-D2新增阿里云临时令牌(redis)(公共)-自定义字段值4不能为空", false);
                    Assert.isNull(addAliTemporaryCredentialsComReqDto.getCustomFieldValue5(), "D2查询对象存储临时令牌详情(公共)-D2新增阿里云临时令牌(redis)(公共)-自定义字段值5不能为空", false);
                    addAliTemporaryCredentialsComRespDto = addAliTemporaryCredentialsCom(addAliTemporaryCredentialsComReqDto)/*vcase invoke 同服务,同domain*/;


                }
//ModelCode: receptionService
                AddObjectStorageConfigRespDto receptionServiceRes = null;
                if (queryUploadConfigInfoDetailComRespDto != null && queryObjectStorageTemporaryCredentialsDetailComRespDto != null) {
                    AddObjectStorageConfigReqDto receptionServiceReq = new AddObjectStorageConfigReqDto();
                    if (queryUploadConfigInfoDetailComRespDto != null) {
                        receptionServiceReq.setEndPoint(queryUploadConfigInfoDetailComRespDto.getAliyunOssBucketDomain());//SimpleFieldAssign//sourceId:2031142_1_73693
                        receptionServiceReq.setReviewUrl(queryUploadConfigInfoDetailComRespDto.getAliyunOssDisplayRootPath());//SimpleFieldAssign//sourceId:2031143_1_73693
                        receptionServiceReq.setBucketName(queryUploadConfigInfoDetailComRespDto.getAliyunOssBucketName());//SimpleFieldAssign//sourceId:2031144_1_73693
                    }
                    if (queryObjectStorageTemporaryCredentialsDetailComRespDto != null) {
                        receptionServiceReq.setAliyunTemporaryIdentityKey(queryObjectStorageTemporaryCredentialsDetailComRespDto.getAliyunTemporaryIdentityKey());//SimpleFieldAssign//sourceId:2031180_1_73693
                        receptionServiceReq.setAliyunTemporaryIdentitySec(queryObjectStorageTemporaryCredentialsDetailComRespDto.getAliyunTemporaryIdentitySec());//SimpleFieldAssign//sourceId:2031181_1_73693
                        receptionServiceReq.setAliyunTemporaryIdentityToken(queryObjectStorageTemporaryCredentialsDetailComRespDto.getAliyunTemporaryIdentityToken());//SimpleFieldAssign//sourceId:2031182_1_73693
                        receptionServiceReq.setAliyunUploadAuthorizationPolicy(queryObjectStorageTemporaryCredentialsDetailComRespDto.getAliyunUploadAuthorizationPolicy());//SimpleFieldAssign//sourceId:2031183_1_73693
                        receptionServiceReq.setAliyunUploadSignature(queryObjectStorageTemporaryCredentialsDetailComRespDto.getAliyunUploadSignature());//SimpleFieldAssign//sourceId:2031184_1_73693
                    }

                    /*M2接收字段出参（特殊方法）[10411]  用于特殊方法接收上游入参。 */
                    Assert.isNull(receptionServiceReq.getEndPoint(), "D2查询对象存储临时令牌详情(公共)-M2接收字段出参（特殊方法）-接入点出参不能为空", false);
                    Assert.isNull(receptionServiceReq.getReviewUrl(), "D2查询对象存储临时令牌详情(公共)-M2接收字段出参（特殊方法）-预览地址出参不能为空", false);
                    Assert.isNull(receptionServiceReq.getBucketName(), "D2查询对象存储临时令牌详情(公共)-M2接收字段出参（特殊方法）-对象存储桶名不能为空", false);
                    receptionServiceRes = nbOss.addObjectStorageConfig(receptionServiceReq);


                    receptionServiceRes_1 = receptionServiceRes;
                }
            } else if ((queryAliTemporaryCredentialsFromRedisDetailComRespDto != null && queryAliTemporaryCredentialsFromRedisDetailComRespDto.getAliyunTemporaryIdentityKey() != null)) {
                //elseif(D2查询阿里云临时令牌详情(redis)(公共).阿里云返回临时身份key值 值不等于空 )  73690

//ModelCode: receptionService
                AddObjectStorageConfigRespDto receptionServiceRes_2 = null;
                if (queryUploadConfigInfoDetailComRespDto != null && queryAliTemporaryCredentialsFromRedisDetailComRespDto != null) {
                    AddObjectStorageConfigReqDto receptionServiceReq_1 = new AddObjectStorageConfigReqDto();
                    if (queryUploadConfigInfoDetailComRespDto != null) {
                        receptionServiceReq_1.setEndPoint(queryUploadConfigInfoDetailComRespDto.getAliyunOssBucketDomain());//SimpleFieldAssign//sourceId:2031142_1_73691
                        receptionServiceReq_1.setReviewUrl(queryUploadConfigInfoDetailComRespDto.getAliyunOssDisplayRootPath());//SimpleFieldAssign//sourceId:2031143_1_73691
                        receptionServiceReq_1.setBucketName(queryUploadConfigInfoDetailComRespDto.getAliyunOssBucketName());//SimpleFieldAssign//sourceId:2031144_1_73691
                    }
                    if (queryAliTemporaryCredentialsFromRedisDetailComRespDto != null) {
                        receptionServiceReq_1.setAliyunTemporaryIdentityKey(queryAliTemporaryCredentialsFromRedisDetailComRespDto.getAliyunTemporaryIdentityKey());//SimpleFieldAssign//sourceId:2031180_1_73691
                        receptionServiceReq_1.setAliyunTemporaryIdentitySec(queryAliTemporaryCredentialsFromRedisDetailComRespDto.getAliyunTemporaryIdentitySec());//SimpleFieldAssign//sourceId:2031181_1_73691
                        receptionServiceReq_1.setAliyunTemporaryIdentityToken(queryAliTemporaryCredentialsFromRedisDetailComRespDto.getAliyunTemporaryIdentityToken());//SimpleFieldAssign//sourceId:2031182_1_73691
                        receptionServiceReq_1.setAliyunUploadAuthorizationPolicy(queryAliTemporaryCredentialsFromRedisDetailComRespDto.getAliyunUploadAuthorizationPolicy());//SimpleFieldAssign//sourceId:2031183_1_73691
                        receptionServiceReq_1.setAliyunUploadSignature(queryAliTemporaryCredentialsFromRedisDetailComRespDto.getAliyunUploadSignature());//SimpleFieldAssign//sourceId:2031184_1_73691
                    }

                    /*M2接收字段出参（特殊方法）[10411]  用于特殊方法接收上游入参。 */
                    Assert.isNull(receptionServiceReq_1.getEndPoint(), "D2查询对象存储临时令牌详情(公共)-M2接收字段出参（特殊方法）-接入点出参不能为空", false);
                    Assert.isNull(receptionServiceReq_1.getReviewUrl(), "D2查询对象存储临时令牌详情(公共)-M2接收字段出参（特殊方法）-预览地址出参不能为空", false);
                    Assert.isNull(receptionServiceReq_1.getBucketName(), "D2查询对象存储临时令牌详情(公共)-M2接收字段出参（特殊方法）-对象存储桶名不能为空", false);
                    receptionServiceRes_2 = nbOss.addObjectStorageConfig(receptionServiceReq_1);


                    receptionServiceRes_1 = receptionServiceRes_2;
                }
            }
        } else if ((queryUploadConfigInfoDetailComRespDto != null && queryUploadConfigInfoDetailComRespDto.getUploadType() != null && queryUploadConfigInfoDetailComRespDto.getUploadType().equals("MINIO_MODEL"))) {
            //elseif(D2查询上传配置信息详情(公共).上传类型 等于 MINIO模式)  73607

//ModelCode: circulationCollections
            for (String circulationCollectionsRes : reqDto.getResourceFileList()) {

                QueryMinoUrlTemporaryCredentialsDetailComRespDto queryMinoUrlTemporaryCredentialsDetailComRespDto = null;
                if (queryUploadConfigInfoDetailComRespDto != null) {
                    QueryMinoUrlTemporaryCredentialsDetailComReqDto queryMinoUrlTemporaryCredentialsDetailComReqDto = new QueryMinoUrlTemporaryCredentialsDetailComReqDto();
                    if (queryUploadConfigInfoDetailComRespDto != null) {
                        queryMinoUrlTemporaryCredentialsDetailComReqDto.setMinioServiceAddress(queryUploadConfigInfoDetailComRespDto.getMinioServiceAddress());//SimpleFieldAssign//sourceId:2031159_1_73610
                        queryMinoUrlTemporaryCredentialsDetailComReqDto.setMinioKey(queryUploadConfigInfoDetailComRespDto.getMinioKey());//SimpleFieldAssign//sourceId:2031160_1_73610
                        queryMinoUrlTemporaryCredentialsDetailComReqDto.setMinioSecretKey(queryUploadConfigInfoDetailComRespDto.getMinioSecretKey());//SimpleFieldAssign//sourceId:2031161_1_73610
                        queryMinoUrlTemporaryCredentialsDetailComReqDto.setMinioTemporaryIdentityExpiration(queryUploadConfigInfoDetailComRespDto.getMinioTemporaryIdentityExpiration());//SimpleFieldAssign//sourceId:2031162_1_73610
                        queryMinoUrlTemporaryCredentialsDetailComReqDto.setMinioBucketName(queryUploadConfigInfoDetailComRespDto.getMinioBucketName());//SimpleFieldAssign//sourceId:2031163_1_73610
                    }
                    if (circulationCollectionsRes != null) {
                        queryMinoUrlTemporaryCredentialsDetailComReqDto.setMinioUploadFileObjectName(circulationCollectionsRes);//SimpleFieldAssign//sourceId:2031164_1_73610
                    }

                    /*D2查询MINIOURL临时令牌详情(公共)[10400]   */
                    Assert.isNull(queryMinoUrlTemporaryCredentialsDetailComReqDto.getMinioServiceAddress(), "D2查询对象存储临时令牌详情(公共)-D2查询MINIOURL临时令牌详情(公共)-MINIO服务地址不能为空", false);
                    Assert.isNull(queryMinoUrlTemporaryCredentialsDetailComReqDto.getMinioKey(), "D2查询对象存储临时令牌详情(公共)-D2查询MINIOURL临时令牌详情(公共)-MINIO的钥匙不能为空", false);
                    Assert.isNull(queryMinoUrlTemporaryCredentialsDetailComReqDto.getMinioSecretKey(), "D2查询对象存储临时令牌详情(公共)-D2查询MINIOURL临时令牌详情(公共)-MINIO的密钥不能为空", false);
                    Assert.isNull(queryMinoUrlTemporaryCredentialsDetailComReqDto.getMinioTemporaryIdentityExpiration(), "D2查询对象存储临时令牌详情(公共)-D2查询MINIOURL临时令牌详情(公共)-MINIO临时身份过期时间不能为空", false);
                    Assert.isNull(queryMinoUrlTemporaryCredentialsDetailComReqDto.getMinioBucketName(), "D2查询对象存储临时令牌详情(公共)-D2查询MINIOURL临时令牌详情(公共)-MINIO桶名字不能为空", false);
                    Assert.isNull(queryMinoUrlTemporaryCredentialsDetailComReqDto.getMinioUploadFileObjectName(), "D2查询对象存储临时令牌详情(公共)-D2查询MINIOURL临时令牌详情(公共)-MINIO上传文件对象名不能为空", false);
                    queryMinoUrlTemporaryCredentialsDetailComRespDto = queryMinoUrlTemporaryCredentialsDetailCom(queryMinoUrlTemporaryCredentialsDetailComReqDto)/*vcase invoke 同服务,同domain*/;


                }
                AddMemoryBusiness2DataComRespDto addMemoryBusiness2DataComRespDto = null;
                if (queryMinoUrlTemporaryCredentialsDetailComRespDto != null) {
                    AddMemoryBusiness2DataComReqDto addMemoryBusiness2DataComReqDto = new AddMemoryBusiness2DataComReqDto();
                    addMemoryBusiness2DataComReqDto.setDataObjectBatchCode(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:2033851_1_73694
                    addMemoryBusiness2DataComReqDto.setIsDataList("TRUE");//sourceId:2033853_1_73694
                    addMemoryBusiness2DataComReqDto.setCustomField1("minioTemporaryUploadUrl");//CUSTOM_CONVENTION//sourceId:2033854_1_73694
                    if (reqDto != null) {
                        addMemoryBusiness2DataComReqDto.setBusinessDataObject(reqDto.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:2033852_1_73694
                    }
                    if (queryMinoUrlTemporaryCredentialsDetailComRespDto != null) {
                        addMemoryBusiness2DataComReqDto.setCustomFieldValue1(queryMinoUrlTemporaryCredentialsDetailComRespDto.getMinioTemporaryUploadUrl());//SimpleFieldAssign//sourceId:2033855_1_73694
                    }

                    /*D2新增内存业务数据(业务原子)[9751]   */
                    Assert.isNull(addMemoryBusiness2DataComReqDto.getDataObjectBatchCode(), "D2查询对象存储临时令牌详情(公共)-D2新增内存业务数据(业务原子)-数据对象批次标识不能为空", false);
                    Assert.isNull(addMemoryBusiness2DataComReqDto.getBusinessDataObject(), "D2查询对象存储临时令牌详情(公共)-D2新增内存业务数据(业务原子)-业务数据对象不能为空", false);
                    Assert.isNull(addMemoryBusiness2DataComReqDto.getIsDataList(), "D2查询对象存储临时令牌详情(公共)-D2新增内存业务数据(业务原子)-是否是数据集对象不能为空", false);
                    Assert.isNull(addMemoryBusiness2DataComReqDto.getCustomField1(), "D2查询对象存储临时令牌详情(公共)-D2新增内存业务数据(业务原子)-自定义字段1不能为空", false);
                    Assert.isNull(addMemoryBusiness2DataComReqDto.getCustomFieldValue1(), "D2查询对象存储临时令牌详情(公共)-D2新增内存业务数据(业务原子)-自定义字段值1不能为空", false);
                    addMemoryBusiness2DataComRespDto = businessAtomService.addMemoryBusiness2DataCom(addMemoryBusiness2DataComReqDto)/*vcase invoke isSameApp*/;


                }
//ModelCode: circulationEnd
            }

            QueryMemorysBusinessDataListComRespDto queryMemorysBusinessDataListComRespDto = null;
            QueryMemorysBusinessDataListComReqDto queryMemorysBusinessDataListComReqDto = new QueryMemorysBusinessDataListComReqDto();
            queryMemorysBusinessDataListComReqDto.setDataObjectBatchCode(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:2034074_1_73698
            queryMemorysBusinessDataListComReqDto.setCustomField1("minioTemporaryUploadUrl");//CUSTOM_CONVENTION//sourceId:2034073_1_73698
            if (reqDto != null) {
                queryMemorysBusinessDataListComReqDto.setBusinessDataObject(reqDto.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:2034072_1_73698
            }

            /*D2获取minio临时下载路径数据集获取[10425]   */
            Assert.isNull(queryMemorysBusinessDataListComReqDto.getDataObjectBatchCode(), "D2查询对象存储临时令牌详情(公共)-D2获取minio临时下载路径数据集获取-数据对象批次标识不能为空", false);
            Assert.isNull(queryMemorysBusinessDataListComReqDto.getBusinessDataObject(), "D2查询对象存储临时令牌详情(公共)-D2获取minio临时下载路径数据集获取-业务数据对象不能为空", false);
            queryMemorysBusinessDataListComRespDto = interfaceModeService.queryMemorysBusinessDataListCom(queryMemorysBusinessDataListComReqDto)/*vcase invoke isSameApp*/;


            queryMemorysBusinessDataListComRespDto_1 = queryMemorysBusinessDataListComRespDto;
//ModelCode: receptionService
            AddObjectStorageConfigRespDto receptionServiceRes_3 = null;
            if (queryUploadConfigInfoDetailComRespDto != null) {
                AddObjectStorageConfigReqDto receptionServiceReq_2 = new AddObjectStorageConfigReqDto();
                if (queryUploadConfigInfoDetailComRespDto != null) {
                    receptionServiceReq_2.setEndPoint(queryUploadConfigInfoDetailComRespDto.getMinioServiceAddress());//SimpleFieldAssign//sourceId:2031142_1_73614
                    receptionServiceReq_2.setReviewUrl(queryUploadConfigInfoDetailComRespDto.getMinioDisplayRootPath());//SimpleFieldAssign//sourceId:2031143_1_73614
                    receptionServiceReq_2.setBucketName(queryUploadConfigInfoDetailComRespDto.getMinioBucketName());//SimpleFieldAssign//sourceId:2031144_1_73614
                }

                /*M2接收字段出参（特殊方法）[10411]  用于特殊方法接收上游入参。 */
                Assert.isNull(receptionServiceReq_2.getEndPoint(), "D2查询对象存储临时令牌详情(公共)-M2接收字段出参（特殊方法）-接入点出参不能为空", false);
                Assert.isNull(receptionServiceReq_2.getReviewUrl(), "D2查询对象存储临时令牌详情(公共)-M2接收字段出参（特殊方法）-预览地址出参不能为空", false);
                Assert.isNull(receptionServiceReq_2.getBucketName(), "D2查询对象存储临时令牌详情(公共)-M2接收字段出参（特殊方法）-对象存储桶名不能为空", false);
                receptionServiceRes_3 = nbOss.addObjectStorageConfig(receptionServiceReq_2);


                receptionServiceRes_1 = receptionServiceRes_3;
            }
        }
        QueryStorageTemporaryCredentialsDetailComRespDto retData = new QueryStorageTemporaryCredentialsDetailComRespDto();
        if (receptionServiceRes_1 != null) {
            retData.setEndPoint(receptionServiceRes_1.getEndPoint());//SimpleFieldAssign//sourceId:2031206_1
            retData.setReviewUrl(receptionServiceRes_1.getReviewUrl());//SimpleFieldAssign//sourceId:2031207_1
            retData.setBucketName(receptionServiceRes_1.getBucketName());//SimpleFieldAssign//sourceId:2031208_1
            retData.setAliyunTemporaryIdentityKey(receptionServiceRes_1.getAliyunTemporaryIdentityKey());//SimpleFieldAssign//sourceId:2031209_1
            retData.setAliyunTemporaryIdentitySec(receptionServiceRes_1.getAliyunTemporaryIdentitySec());//SimpleFieldAssign//sourceId:2031210_1
            retData.setAliyunTemporaryIdentityToken(receptionServiceRes_1.getAliyunTemporaryIdentityToken());//SimpleFieldAssign//sourceId:2031211_1
            retData.setAliyunUploadAuthorizationPolicy(receptionServiceRes_1.getAliyunUploadAuthorizationPolicy());//SimpleFieldAssign//sourceId:2031212_1
            retData.setAliyunUploadSignature(receptionServiceRes_1.getAliyunUploadSignature());//SimpleFieldAssign//sourceId:2031213_1
        }
        if (queryMemorysBusinessDataListComRespDto_1 != null && queryMemorysBusinessDataListComRespDto_1.getMemoryBusinessResDataList() != null && !CollectionUtil.isEmpty(queryMemorysBusinessDataListComRespDto_1.getMemoryBusinessResDataList())) {
            retData.setObjectStorageTemporaryCredentialsList(queryMemorysBusinessDataListComRespDto_1.getMemoryBusinessResDataList().stream().map(item -> item.getCustomField1())
                    .collect(Collectors.toList()));/*list-to-strings*///sourceId:2033563_1
        }


        return retData;
    }

    /**
     * D2接收出参(公共)[10541]
     * gen by moon at 6/3/2025, 1:03:51 PM
     */
    @Trace(operationName = "D2接收出参(公共)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Transactional(rollbackFor = Exception.class)
    @Override
    public QueryObjectStorageConfigDetailComRespDto queryObjectStorageConfigDetailCom(QueryObjectStorageConfigDetailComReqDto reqDto) {


        ObtainReceiveFieldsRespDto receptionServiceRes_1 = null;
//步骤0: M2获取接收字段 - obtainReceiveFields
        //ModelCode: receptionService
        ObtainReceiveFieldsRespDto receptionServiceRes = null;
        ObtainReceiveFieldsReqDto receptionServiceReq = new ObtainReceiveFieldsReqDto();
        if (reqDto != null) {
            receptionServiceReq.setUnstructuredDataId(reqDto.getUnstructuredDataId());//SimpleFieldAssign//sourceId:2048638_1
        }

        /*M2获取接收字段[4007]  用于特殊方法接收上游入参。 */
        receptionServiceRes = nbOss.obtainReceiveFields(receptionServiceReq);


        receptionServiceRes_1 = receptionServiceRes;

        QueryObjectStorageConfigDetailComRespDto retData = new QueryObjectStorageConfigDetailComRespDto();
        if (receptionServiceRes_1 != null) {
            retData.setUnstructuredDataId(receptionServiceRes_1.getUnstructuredDataId());//SimpleFieldAssign//sourceId:2048741_1
        }


        return retData;
    }
    //
}
